package com.weiyuwqj.server.mapper;

import com.weiyuwqj.api.model.BusAssetPackageInvest;
import com.weiyuwqj.api.model.vo.BusAssetPackageInvestVo;
import org.apache.ibatis.annotations.Param;

import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;
@Repository
public interface BusAssetPackageInvestMapper extends Mapper<BusAssetPackageInvest> {

    /**
     * 根据计划id查询计划投资列表
     * @param packagePlanId
     * @return
     */
    List<BusAssetPackageInvestVo> getListByPlanId(Integer packagePlanId);

    /**
     * 根据id和旧状态修改新状态
     * @param newStatus 新状态
     * @param oldStatus 旧状态
     * @param id        投资id
     * @return
     */
    Integer modifyPackageInvestStatusById(@Param("newStatus")Integer newStatus,@Param("oldStatus")Integer oldStatus,@Param("id")Integer id);

    /**
     * 插入计划投资表
     * @param assetPackageInvest
     * @return
     */
    Integer insertPackageInvest(BusAssetPackageInvest assetPackageInvest);

    Integer modifyPackageInvestFreezeOrderNoById(@Param("freezeOrderNo")String freezeOrderNo,@Param("id")Integer id);
}